home *** CD-ROM | disk | FTP | other *** search
- /*
-
- try Lattice C control break interrupt handler
-
- */
-
- #include <h\stdio.h>
-
- main(argc, argv)
- int argc;
- char *argv[];
-
- { int hit = 0;
- int c = 0;
- static int flag = 0;
-
- capture(&flag);
- puts("\nTRY has CAPTURED interrupt vectors\n");
-
- while ( (c&127) != 'Q')
- { hit = kbhit();
- if (flag != 0)
- { puts("\nControl-Break detected\n");
- flag=0;
- }
- if (hit != 0)
- { c=getch();
- putch(c);
- }
- }
- release();
- puts("\n\nTRY has RELEASEd interrupt vectors\n");
-
- }